"""练习8-8"""


def make_album(singer, album_name, song_count=None):
    album = {
        "singer": singer,
        "album_name": album_name
    }

    if song_count is not None:
        album["song_count"] = song_count

    return album


print("请输入歌手和专辑的名字，你可以随时输入q退出程序")
while True:
    singer = input("请输入歌手的名字：")
    if singer == "q":
        break

    album_name = input("请输入专辑的名字：")
    if album_name == "q":
        break

    print(make_album(singer, album_name))
